package com.pingan.agentbank.aaos.test;

import com.pingan.vframe.Controller;
import com.pingan.vframe.beans.Injector;
import com.pingan.vframe.threadpool.ThreadPool;
import org.junit.Test;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class ZeroFiveZeroNine {

    /*
    * 测试更改数据源
    * */
    @Test
    public void method1() throws InterruptedException {
        Injector injector = Controller.getInstance().getInjector();
        ThreadPool tp = injector.getBean(ThreadPool.class);
        TestTask testTask = injector.getBean(TestTask.class);
        tp.execute(testTask);
        Thread.sleep(Integer.MAX_VALUE);
    }

    @Test
    public void method2() throws IOException {
        OutputStream outputStream = new FileOutputStream("D:/temp/test666.txt");
        outputStream.flush();
        outputStream.close();
    }
}
